import { createRouter, createWebHistory } from "vue-router";
import { permissionModule } from "./permissionModule";
export const allPagesRoutes = [
  {
    path: "/",
    component: () => import("../App.vue"),
    redirect: "/home",
    breadUrl: "/home",
    meta: {
      title: "indightOS管理系统",
      icon: "el-icon-document",
    },
    children: [
      {
        path: "home",
        component: () => import("../views/home/index.vue"),
        name: "home",
        meta: {
          title: "首页",
          icon: "el-icon-document",
        },
      },
    ],
  },
  //   权限相关接口
  ...permissionModule,
];

export const router = createRouter({
  history: createWebHistory(),
  routes: allPagesRoutes,
});
